# -*- coding: utf-8 -*-

'''
    Abstract online libraries aggregator.
    Aggregator usually created for some online library site
    and can use API or web-page parsing for information extracting
'''

import logging

log = logging.getLogger(__name__)

class AbstractAggregator(object):
    
    def search_by_title(self, title, results_set):
        try:
            self.__search_by_title(title, results_set)
        except Exception, e:
            log.error(e)
            results_set.add_empty()
            return

    def __search_by_title(self, title, results_set):
        log.error("It is ABSTRACT method. We need it to be overrided!")
        pass
